import re
line="Cats are smarter than dogs"
a=re.match(r'(.*) are (.*?) .*',line,re.M|re.I);
if a:
	print("a.group():",a.group());
	print("a.group(1):",a.group(1));
	print("a.group(2):",a.group(2));
else:
	print('No math!!');